package simpleFactory;

public class Main {
    public static void main(String[] args) {
        // 使用多态
//        Fruit apple = new Apple();
//        apple.get();
//
//        Fruit banana = new Banana();
//        banana.get();


        // 使用简单工厂模式
        Factory factory = new Factory();
        factory.get(Apple.class).get();
        factory.get(Banana.class).get();
    }
}
